﻿<%@ Page Title="Create User Page" Language="C#" MasterPageFile="  ~/Template/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EAClient.Default" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

				<div class="banner_category">
					<div class="banner">
						<img src="Resources/Banner/3.jpg" alt=""/>
					</div>
					<div class="category">
                        <% List<EA.DTO.ProductTO> listBestCatProduct = (List<EA.DTO.ProductTO>)Attributes["listBestCatProduct"]; %>
						<div class="title">
							<h2>Top the best Fashion</h2>
						</div>
						<div class="content">
					
						
							<div class="slide_show">
                                <input type="hidden" id="hidden_best_product_index" value="<%=0 %>" />
								<div class="previous" >
									<img src="Images/arrow-prev.png" alt="" onclick="previous('hidden_best_product_index','slide_best_product',<%=listBestCatProduct %>)"/>
								</div>
								<div class="slide_page">
                                    <%
                                        

                                        for (int i = 0; i < listBestCatProduct.Count; i++)
                                        {
                                    %>
									<div class="slide_page_item" <%=(i==0)?"display:''":"display:none" %> id="slide_best_product<%=i %>">
                                        
										<div class="product_image">
                                             <a href="DetailProduct.aspx?id=<%=listBestCatProduct[i].ID %>">
											    <img src="<%= EAClient.WebPage.PATH_IMAGE+listBestCatProduct[i].Url %>" alt=""/>
                                             </a>
										</div>
										<div class="sub_header_product">
											<div class="rating">
												 <% for (int j = 0; j < listBestCatProduct[i].BuyerRating; j++)
                                                   { %>
												    <img src="Images/rating_on.png" alt="*"/>
                                                <%} %>
                                                <% for (int j = 0; j < 5 - listBestCatProduct[i].BuyerRating; j++)
                                                   { %>
												    <img src="Images/rating_off.png" alt="*"/>
                                                <%} %>
											</div>
											<div class="product_modify">
												<font class="product_name"><%=listBestCatProduct[i].Name %></font> 
												<br/>
												<font class="price"><%=listBestCatProduct[i].CurrentPrice %>$</font>
											</div>
										</div>
									</div>
                                    <%} %>
								</div>
								
								<div class="next">
									<img src="Images/arrow-next.png" alt="" onclick="next('hidden_best_product_index','slide_best_product',<%=listBestCatProduct %>)"/>
								</div>
							</div>
						
						
						
						</div>
					</div>
				</div>
				<div class="line1"></div>
				<div class="_content">
				    <% List<EA.DTO.ProductTO> listPopularProduct = (List<EA.DTO.ProductTO>)Attributes["listPopularProduct"]; %>
					<div class="_popular_product">
						<div class="popular_product">
							<div class="title"><h1>List of popular products</h1></div>
							<div class="content">
								<div class="slide_button">
									<img src="Images/br_back_out.png" alt="Pre" onclick="previous('hidden_popular_product_index','slide_popular_product',<%=listPopularProduct.Count %>)"/>
								</div>
								<div class="slide_page">
                                    <input type="hidden" id="hidden_popular_product_index" value="<%=0 %>" />
                                   <%
                                       
                                       for (int i = 0; i < listPopularProduct.Count;)
                                        {
                                    %>
                                       
									<div class="slide_item_page" <%=(i==0)?"display:''":"display:none" %> id="slide_popular_product<%=i %>" >
                                        <% for (int j = 0; j < 3 && i < listPopularProduct.Count; i++, j++){ %>
										<div class="_product">
											<div class="product">
                                                <a href="DetailProduct.aspx?id=<%=listPopularProduct[i].ID %>">
												    <div class="image"><img src="<%= EAClient.WebPage.PATH_IMAGE+listPopularProduct[i].Url %>"/></div>
                                                </a>
												<div class="product_name"><a href="/DetailProduct.aspx?id=<%=listPopularProduct[i].ID %>"><%=listPopularProduct[i].Name %></a></div>
												<div class="_price">
													<div><img src="Images/like_button.png" alt=""/></div>
													<div class="price"><%=listPopularProduct[i].CurrentPrice %>$</div>
												</div>
											</div>
										</div>
                                        <%} %>
									</div>
                                    <%} %>
								</div>
								<div class="slide_button">
									<img src="Images/br_next_out.png" alt="Pre" onclick="next('hidden_popular_product_index','slide_popular_product',<%=listPopularProduct.Count %>)"/>
								</div>
							</div>
						</div>
						
						<div class="newest_product">
							<div class="title"><h1>List of newest products</h1></div>
							<div class="content">

								<%
                                    List<EA.DTO.ProductTO> listOfNewestProduct = (List<EA.DTO.ProductTO>) Attributes["listNewestProduct"];

                                    for (int i = 0; i < listOfNewestProduct.Count; i++)
                                    {
                                 %>
								    <div class="_product">
									    <div class="product">
										    <div class="image">
                                                <a href="/DetailProduct.aspx?id=<%=listOfNewestProduct[i].ID %>">
                                                   <img src="<%= EAClient.WebPage.PATH_IMAGE+listOfNewestProduct[i].Url %>"/>
                                                </a>
                                             </div>
										    <div class="product_name"><a href="/DetailProduct.aspx?id=<%=listOfNewestProduct[i].ID %>"><%=listOfNewestProduct[i].Name %></a></div>
										    <div class="_price">
											    <div><img src="Images/like_button.png" alt=""/></div>
											    <div class="price"><%= listOfNewestProduct[i].CurrentPrice %>$</div>
										    </div>
									    </div>
								    </div>
								<%} %>
							</div>
						</div>
					</div>
					
					<div class="popular_search">
						<div class="title"><h2>Popular Search</h2></div>
						<div class="content">
							<div style="background-color:green"><a href="">Coffee</a></div> 
							<div style="background-color:green"><a href="">zalo</a></div> 
							<div style="background-color:orange"><a href="">Fruid</a></div> 
							<div style="background-color:orange"><a href="">Dress</a></div> 
							<div style="background-color:orange"><a href="">beer</a></div>
							<div style="background-color:orange"><a href="">tee</a></div> 
							<div style="background-color:#494949"><a href="">123mua</a></div> 
							<div style="background-color:#494949"><a href="">led</a></div> 
							<div><a href="">pics</a></div> 
							<div><a href="">animal</a></div>
							<div><a href="">Bag</a></div>
						</div>
					</div>
					<div class="ads">
						<a href="http://www.zalora.vn/"><img src="Resources/Ads/Zalora.jpg"/></a>
						<a href="http://www.addidas.com/"><img src="Resources/Ads/addidas.jpg"/></a>
					</div>
					
					<div class="home_block_product_3">
						<div class="product_tab">
							<div class="tab_control">
								<div id="tab_control1" onclick="chooseTab('1','tab_choose')" class="tab_choose">Antiques</div>
								<div id="tab_control2" onclick="chooseTab('2','tab_choose')">Electrics Product</div>
								<div id="tab_control3" onclick="chooseTab('3','tab_choose')">Pictures</div>
								<div id="tab_control4" onclick="chooseTab('4','tab_choose')">Books</div>
							</div>
							<div class="content">

                                
                                <div style="" id="tab1">
                                    <%
                                        List<EA.DTO.ProductTO> listCatProductTabOne = (List<EA.DTO.ProductTO>)Attributes["listCatProductTabOne"];

                                        for (int i = 0; i < listCatProductTabOne.Count; i++)
                                        {
                                    %>
								        <div class="_product">
									        <div class="product">
										        <div class="image"><img src="<%= EAClient.WebPage.PATH_IMAGE+listCatProductTabOne[i].Url  %>"/></div>
										        <div class="product_name"><%=listCatProductTabOne[i].Name %></div>
										        <div class="_price">
											        <div><img src="Images/like_button.png" alt=""/></div>
											        <div class="price"><%=listCatProductTabOne[i].CurrentPrice %>$</div>
										        </div>
									        </div>
								        </div>
                                    
                                    <%} %>
								</div>

                                <div style="display:none" id="tab2">
                                    <%
                                        List<EA.DTO.ProductTO> listCatProductTabTwo = (List<EA.DTO.ProductTO>)Attributes["listCatProductTabTwo"];

                                        for (int i = 0; i < listCatProductTabTwo.Count; i++)
                                        {
                                    %>
								        <div class="_product">
									        <div class="product">
										        <div class="image"><img src="<%= EAClient.WebPage.PATH_IMAGE+listCatProductTabTwo[i].Url  %>"/></div>
										        <div class="product_name"><%=listCatProductTabTwo[i].Name %></div>
										        <div class="_price">
											        <div><img src="Images/like_button.png" alt=""/></div>
											        <div class="price"><%=listCatProductTabTwo[i].CurrentPrice %>$</div>
										        </div>
									        </div>
								        </div>
                                    
                                    <%} %>
								</div>


                                <div style="" id="tab3">
                                    <%
                                        List<EA.DTO.ProductTO> listCatProductTabThree = (List<EA.DTO.ProductTO>)Attributes["listCatProductTabThree"];

                                        for (int i = 0; i < listCatProductTabThree.Count; i++)
                                        {
                                    %>
								        <div class="_product">
									        <div class="product">
										        <div class="image"><img src="<%= EAClient.WebPage.PATH_IMAGE+listCatProductTabThree[i].Url  %>"/></div>
										        <div class="product_name"><%=listCatProductTabThree[i].Name %></div>
										        <div class="_price">
											        <div><img src="Images/like_button.png" alt=""/></div>
											        <div class="price"><%=listCatProductTabThree[i].CurrentPrice %>$</div>
										        </div>
									        </div>
								        </div>
                                    
                                    <%} %>
								</div>

                                <div style="" id="tab4">
                                    <%
                                        List<EA.DTO.ProductTO> listCatProductTabFour = (List<EA.DTO.ProductTO>)Attributes["listCatProductTabFour"];

                                        for (int i = 0; i < listCatProductTabFour.Count; i++)
                                        {
                                    %>
								        <div class="_product">
									        <div class="product">
										        <div class="image"><img src="<%= EAClient.WebPage.PATH_IMAGE+listCatProductTabFour[i].Url  %>"/></div>
										        <div class="product_name"><%=listCatProductTabFour[i].Name %></div>
										        <div class="_price">
											        <div><img src="Images/like_button.png" alt=""/></div>
											        <div class="price"><%=listCatProductTabFour[i].CurrentPrice %>$</div>
										        </div>
									        </div>
								        </div>
                                    
                                    <%} %>
								</div>



							</div>
						</div>
						
						<div class="best_product_like">
							<div class="title"><a>Top the best favourites</a> <img src="Images/logo.png"/></div>
							<div class="content">
                                <%
                                    List<EA.DTO.ProductTO> listOfFavouriteProduct = (List<EA.DTO.ProductTO>)Attributes["listFavouriteProduct"];

                                    for (int i = 0; i < listOfFavouriteProduct.Count; i++)
                                    {
                                 %>
								<div class="product">
                                    <a href="DetailProduct.aspx?id=<%=listOfFavouriteProduct[i].ID %>">
									    <div class="image"><img src="<%= EAClient.WebPage.PATH_IMAGE+listOfFavouriteProduct[i].Url  %>" alt="" title=""/></div>
                                    </a>
									<div class="intro">
										<div class="product_name"><a href="DetailProduct.aspx?id=<%=listOfFavouriteProduct[i].ID %>"><%=listOfFavouriteProduct[i].Name %></a></div>
										<div>
											<div class="favourite">
                                                <% for (int j = 0; j < listOfFavouriteProduct[i].BuyerRating; j++)
                                                   { %>
												    <img src="Images/rating_on.png" alt="*"/>
                                                <%} %>
                                                <% for (int j = 0; j < 5- listOfFavouriteProduct[i].BuyerRating; j++)
                                                   { %>
												    <img src="Images/rating_off.png" alt="*"/>
                                                <%} %>
											</div>
											<div class="price"><%=listOfFavouriteProduct[i].CurrentPrice%>$</div>
										</div>
									</div>
								</div>
								<%} %>
							</div>
						</div>
					</div>
					
				</div>
				<div class="line1"></div>
				<div class="_alert">
					<div class="alert">
						<div class="alert_ul"><img src="Images/alert.png"/></div>
						<div>
						 Your personal information will be guarded, we will support you to purchase the best product.
						Click <img src="Images/like_button.png"/> if you like our product.
						</div>
					</div>
				</div>
			

</asp:Content>
